package edu.zut.servlet;

import javax.servlet.*;
import java.io.IOException;

//自定义一个类实现servlet接口
public class DemoServlet implements Servlet {
    @Override
    public void init(ServletConfig config) throws ServletException {
        System.out.println("servlet创建执行.......");
    }

    @Override
    public void service(ServletRequest req, ServletResponse res) throws ServletException, IOException {
        System.out.println("servlet程序开始执行");
    }

    @Override
    public void destroy() {
        System.out.println("当前servlet销毁");
    }

    @Override
    public ServletConfig getServletConfig() {
        return null;
    }
    @Override
    public String getServletInfo() {
        return null;
    }
}
